package com.fang.shirotestnoredis.common;

public enum  ResponseCode {
    //200:成功
    SUCCESS(200,"操作成功"),
    //1001：未经过认证
    UNLOGIN(1001,"您未登录"),
    //1002:未授权
    UNAUTHORIZED(1002,"您没有权限"),
    //1003:学号已存在
    USERIDISEXIST(1003,"学号已存在"),
    //1004:手机好不存在
    PHONEISNOTEXIST(1004,"手机号不存在"),
    //1005:组名重复
    GROUPISEXIST(1005,"组名已存在"),
    //1006:用户已存在该组
    USERGROUPISEXIST(1006,"您已加入该组"),
    //1007:当前用户并没加入该组
    USERISNOTEXISTGROUP(1007,"您并未加入该组"),
    //1008:当前计划的负责人不是登录的用户
    USERISNOTPRINCIPAL(1008,"您不是该计划的负责人"),
    //1009:该项目组的信息已存在
    GROUPINFOISEXIST(1009,"该项目组的信息已存在"),
    //1010:用户名或密码错误
    PASSWORDISERROR(1010,"用户名或密码错误"),
    //500:错误
    ERROR(500,"服务器出错,操作失败");


    private final int code;
    private final String desc;

    ResponseCode(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
